#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "../umlcore/PartialElement.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class Element;

/// <summary>
/// Relationship
/// Relationship is an abstract concept that specifies some kind of relationship
/// between Elements.
/// </summary>
class UMLMODEL_EXPORT Relationship : public PartialElement {

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// relatedElements getter
    /// Specifies the elements related by the Relationship.
    /// </summary>
    vector<shared_ptr<Element>>& relatedElements();

private: // Fields
    /// <summary>
    /// relatedElements
    /// Specifies the elements related by the Relationship.
    /// </summary>
    vector<shared_ptr<Element>> relatedElements_;

};

} // namespace uml
